<?php
	require_once 'class/config_database.php';
	require_once 'class/kamar.php';
	$kamar_dao = new Kamar_Dao($host,$user,$pass,$dbnm);
	$kamar	   = new Kamar();
	//Proses unggah photo
	$kamar->room_figure       =$kamar_dao->unggah_photo();
	//Proses membentuk objek pengguna
	$kamar->id_pengguna =$_SESSION["Id_pengguna"];
	$kamar->rooms_name  =$_POST["rooms_name"];
	$kamar->price		=$_POST["price"];
	$kamar->facility    =$_POST["facility"];
	$kamar->address     =$_POST["address"];
	$kamar->roomspace   =$_POST["roomspace"];
	$kamar->map_lock    =$_POST["location"];
	$kamar_dao->add($kamar);
?>